package tpf.designer.pattern.course7.behavior_pattern2.strategy_21;

import org.apache.log4j.Logger;
import org.junit.Test;

public class Client {
    public static final Logger LOGGER = Logger.getLogger(Client.class);

    @Test
    public void testStrategy(){
        //选择并创建需要使用的策略对象
        MemberStrategy strategy = new AdvancedMemberStrategy();
        //创建环境
        Price price = new Price(strategy);
        //计算价格
        double quote = price.quote(300);
        System.out.println("图书的最终价格为：" + quote);
    }
}
